package mr.zhang.dao.impl;

import mr.zhang.dao.CustomerDao;
import org.hibernate.SessionFactory;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

public class CustomerDaoImplTest {


    private SessionFactory sessionFactory;

    public SessionFactory getSessionFactory() {
        return sessionFactory;
    }

    public void setSessionFactory(SessionFactory sessionFactory) {
        this.sessionFactory = sessionFactory;
    }
    @Autowired
    private CustomerDao customerDao;
    @Before
    public void setUp() throws Exception {
         customerDao = new  CustomerDaoImpl();
    }

    @Test
    public void testQueryCustomerList() throws Exception {

//        Session session = sessionFactory.getCurrentSession();
//
//        session.createQuery("FROM TCustomer ");

        customerDao.queryCustomerList();



    }





}